package org.csu.measure.domain;

import java.util.ArrayList;
import java.util.List;

/**
 * 解析的类
 */
public class Class {

    private String id;  //类的id
    private String name;  //类名
    private List<AttributeOfClass> attributes;  //类的属性
    private List<Operation> operations;  //类的方法列表
    private Class father;  //类的父类
    private String generalization;  //类
    private List<Class> children;  //类的子类列表
    private List<String> dependencies;  //类之间的依赖关系
    private List<String> associations;  //类之间的关联关系
    private List<String> aggregations;  //类之间的聚合关系
    private List<String> compositions;  //类之间的组合关系

    private CKMetrics ck;  //ck指标数据
    private LKMetrics lk;  //lk指标数据

    public Class() {
        super();
        attributes = new ArrayList<>();
        operations = new ArrayList<>();
        children = new ArrayList<>();
        dependencies = new ArrayList<>();
        associations = new ArrayList<>();
        aggregations = new ArrayList<>();
        compositions = new ArrayList<>();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<AttributeOfClass> getAttributes() {
        return attributes;
    }

    public void addAttributes(AttributeOfClass attribute) {
        attributes.add(attribute);
    }

    public List<Operation> getOperations() {
        return operations;
    }

    public void addOperations(Operation operation) {
        operations.add(operation);
    }

    public Class getFather() {
        return father;
    }

    public void setFather(Class father) {
        this.father = father;
    }

    public String getGeneralization() {
        return generalization;
    }

    public void setGeneralization(String generalization) {
        this.generalization = generalization;
    }

    public List<Class> getChildren() {
        return children;
    }

    public void addChildren(Class child) {
        children.add(child);
    }

    public List<String> getDependencies() {
        return dependencies;
    }

    public void addDependencies(String classID) {
        dependencies.add(classID);
    }

    public List<String> getAssociations() {
        return associations;
    }

    public void addAssociations(String classID) {
        associations.add(classID);
    }

    public List<String> getAggregations() {
        return aggregations;
    }

    public void addAggregations(String classID) {
        aggregations.add(classID);
    }

    public List<String> getCompositions() {
        return compositions;
    }

    public void addCompositions(String classID) {
        compositions.add(classID);
    }

    public CKMetrics getCk() {
        return ck;
    }

    public void setCk(CKMetrics ck) {
        this.ck = ck;
    }

    public LKMetrics getLk() {
        return lk;
    }

    public void setLk(LKMetrics lk) {
        this.lk = lk;
    }
}
